

use "BMW Dataverse dataset.dta"



rename wbcode ccodealp

 merge m:1 ccodealp year using "fria.amended3.dta"
 
 rename lvaw_garriga lvaw_garriga_2012
 
 

 
 generate loggdp= log(wdi_gdpcapcon2010)
generate logdebt= log( gov_grossdebt)


 
*Generation of fiscal rules variables* 

*Generation of dummy for expenditure rule with statuary or constitutional basis*
generate statconER=0
replace statconER=1 if ER== 1 & legal_n_ER==3 |ER== 1 & legal_n_ER==5
replace statconER=. if ER==.

*Generation of dummy for revenue rule with statuary or constitutional basis*
generate statconRR=0
replace statconRR=1 if RR== 1 & legal_n_RR==3 |RR== 1 & legal_n_RR==5
replace statconRR=. if RR==.

*Generation of dummy for balanced budget rule with statuary or constitutional basis*
generate statconBBR=0
replace statconBBR=1 if BBR== 1 & legal_n_BBR==3 |BBR== 1 & legal_n_BBR==5
replace statconBBR=. if BBR==.



*Generation of dummy for debt rule with statuary or constitutional basis*
generate statconDR=0
replace statconDR=1 if DR== 1 & legal_n_DR==3 |DR== 1 & legal_n_DR==5
replace statconDR=. if DR==.




*Generation of IMF national expenditure rules index* 
*Rescale cover of expenditure rule*
generate cover_n_er2= cover_n_ER/2

*Rescale legal scope of expenditure rule*
generate legal_n_er2= legal_n_ER/5

*generation of Expenditure rules strenght index* 
generate ER_n_strengh = cover_n_er2 + legal_n_er2 + enforce_n_ER + suport_ceil_n_a + frl + suport_budg_n + suport_impl_n


*Rescale cover of revenue rule*
generate cover_n_rr2= cover_n_RR/2

*Rescale legal scope of revenue rule*
generate legal_n_rr2= legal_n_RR/5

*generation of revenue rules strenght index*
generate RR_n_strengh= cover_n_rr2 + legal_n_rr2 + enforce_n_RR + frl + suport_budg_n + suport_impl_n

*Rescale cover of balanced budget rule*
generate cover_n_bbr2=cover_n_BBR/2

*Rescale legal scope of balanced budget rule*
generate legal_n_bbr2= legal_n_BBR/5

*generation of balanced budget rules strenght index*
generate BBR_n_strengh= cover_n_bbr2 + legal_n_bbr2 + enforce_n_BBR + suport_ceil_n_a + frl + suport_budg_n + suport_impl_n

*Rescale cover of debt rule*
generate cover_n_dr2= cover_n_DR/2

*Rescale legal scope of debt rule*
generate legal_n_dr2= legal_n_DR/5

*generation of debt rule strenght index*
generate DR_n_strengh= cover_n_dr2 + legal_n_dr2 + enforce_n_DR + suport_ceil_n_a + frl + suport_budg_n + suport_impl_n


*Generation of overal fiscal rules index*
generate nationalfiscalrulesindex=((DR_n_strengh*5/7) + (BBR_n_strengh*5/7) + (RR_n_strengh*5/6) + (ER_n_strengh*5/7))/4



*Generation of national fiscal rules in place*
generate nationaler=0
replace nationaler=1 if ER==1 & ER_supra!=2
replace nationaler=. if ER==. 

generate nationalrr=0
replace nationalrr=1 if RR==1 & RR_supra!=2
replace nationalrr=. if RR==. 

generate nationalbbr=0
replace nationalbbr=1 if BBR==1 & BBR_supra!=2
replace nationalbbr=. if BBR==. 

generate nationaldr=0
replace nationaldr=1 if DR==1 & DR_supra!=2
replace nationaldr=. if DR==. 


generate nationalfiscalrule=0
replace nationalfiscalrule=1 if nationaler==1 | nationalrr==1 | nationalbbr==1 | nationaldr==1
replace nationalfiscalrule=. if year<1985 | year>2015




*Alternative fiscal rules strenght indexes: Without ceilings and fiscal responsibility law:

*National fiscal rules*
*generation of Expenditure rules strenght index* 
generate ER_n_strengh2 = cover_n_er2 + legal_n_er2 + enforce_n_ER  + suport_budg_n + suport_impl_n


*generation of revenue rules strenght index*
generate RR_n_strengh2= cover_n_rr2 + legal_n_rr2 + enforce_n_RR +  suport_budg_n + suport_impl_n

*generation of balanced budget rules strenght index*
generate BBR_n_strengh2= cover_n_bbr2 + legal_n_bbr2 + enforce_n_BBR +  suport_budg_n + suport_impl_n

*generation of debt rule strenght index*
generate DR_n_strengh2= cover_n_dr2 + legal_n_dr2 + enforce_n_DR + suport_budg_n + suport_impl_n


*Generation of overal fiscal rules index*
generate nationalfiscalrulesindex2=((DR_n_strengh2*5/5) + (BBR_n_strengh2*5/5) + (RR_n_strengh2*5/5) + (ER_n_strengh2*5/5))/4


 
 *Anoother alternative fiscal rules strenght indexes: Without any auxilliary institutions:

*National fiscal rules*
*generation of Expenditure rules strenght index* 
generate ER_n_strengh3 = cover_n_er2 + legal_n_er2 + enforce_n_ER 


*generation of revenue rules strenght index*
generate RR_n_strengh3= cover_n_rr2 + legal_n_rr2 + enforce_n_RR 

*generation of balanced budget rules strenght index*
generate BBR_n_strengh3= cover_n_bbr2 + legal_n_bbr2 + enforce_n_BBR 

*generation of debt rule strenght index*
generate DR_n_strengh3= cover_n_dr2 + legal_n_dr2 + enforce_n_DR 


*Generation of overal fiscal rules index*
generate nationalfiscalrulesindex3=((DR_n_strengh3*3/3) + (BBR_n_strengh3*3/3) + (RR_n_strengh3*3/3) + (ER_n_strengh3*3/3))/4


 
 
 xtset ccode time
 rename anyIssue_UT_gt6mo issuanceOutcome
rename alreadyIssuedThisYear_UT_gt6mo alreadyIssued
gen amountOutcome = totalAmt_UT_gt6mo



*Figure 1*

generate autocratic=0
replace autocratic= 1 if democracy==0
replace autocratic=. if democracy==.
generate laggeddemocracy= l12.democracy
generate laggedautocracy= l12.autocratic 


generate reversepolyarchy= 1-v2x_polyarchymerged

bysort year : egen year_mean = mean(nationalfiscalrule)
bysort year : egen autocracy_year_mean = mean(nationalfiscalrule) if laggeddemocracy!=1 & laggeddemocracy!=.
bysort year : egen democracy_year_mean = mean(nationalfiscalrule) if laggeddemocracy==1 & laggeddemocracy!=.

twoway (line year_mean year,lcolor(black) )  (line democracy_year_mean year, lpattern(shortdash) lcolor(black) )  (line autocracy_year_mean year, lpattern(longdash) lcolor(black) )  ,graphregion(color(white)) ytitle(Share of countries with national fiscal rules) ylabel(, format(%9.1f)) xlabel(1985 1990 1995 2000 2005 2010 2015)  legend(label(1 "All countries") label(2 "Democracies") label (3 "Autocracies")), if year > 1984 & year<2016
graph export figure1.png


 xtset ccode time

 

*Collapsing to year level*
drop if year<1990
 collapse  (mean) oecd issuanceOutcome log_totalAmt_UT democracy v2x_polyarchymerged  nationalfiscalrule gov_grossdebt curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region  v2x_polyarchy imfprogram treasury10yr  lvaw_garriga_2012 inflation_annual  nationalfiscalrulesindex  nationalfiscalrulesindex2 nationalfiscalrulesindex3 elect_dum  exportsToUS leader_elect SPnum MoodysNUM FitchNUM avgRating hasRating crisis_sovdebt hrv, by( ccode year)

 
 *Rounding democracy up and down (trouble from collapsing)
replace democracy=round(democracy, 1.0)

 *Core results*
 xtset ccode year
 
 
 *Lagging the democracy/autocracy variable*
generate autocratic=0
replace autocratic= 1 if democracy==0
replace autocratic=. if democracy==.
generate laggeddemocracy= l1.democracy
generate laggedautocracy= l1.autocratic 
 
 
 *Inserting autocracy scores for 1990*
 replace laggedautocracy=1 if year==1990 & ccode==2
  replace laggedautocracy=1 if year==1990 & ccode==3
  replace laggedautocracy=1 if year==1990 & ccode==4
  replace laggedautocracy=0 if year==1990 & ccode==5
  replace laggedautocracy=0 if year==1990 & ccode==7
  replace laggedautocracy=0 if year==1990 & ccode==8
  replace laggedautocracy=0 if year==1990 & ccode==10
  replace laggedautocracy=1 if year==1990 & ccode==10
  replace laggedautocracy=1 if year==1990 & ccode==12
  replace laggedautocracy=1 if year==1990 & ccode==13
  replace laggedautocracy=1 if year==1990 & ccode==14
  replace laggedautocracy=1 if year==1990 & ccode==15
  replace laggedautocracy=0 if year==1990 & ccode==16
  replace laggedautocracy=0 if year==1990 & ccode==19
  replace laggedautocracy=0 if year==1990 & ccode==20
  replace laggedautocracy=0 if year==1990 & ccode==21
  replace laggedautocracy=0 if year==1990 & ccode==22
  replace laggedautocracy=0 if year==1990 & ccode==23
  replace laggedautocracy=0 if year==1990 & ccode==24
  replace laggedautocracy=0 if year==1990 & ccode==25
  replace laggedautocracy=1 if year==1990 & ccode==26
  replace laggedautocracy=1 if year==1990 & ccode==27
  replace laggedautocracy=1 if year==1990 & ccode==28
    replace laggedautocracy=1 if year==1990 & ccode==29
    replace laggedautocracy=1 if year==1990 & ccode==30
    replace laggedautocracy=0 if year==1990 & ccode==31
    replace laggedautocracy=1 if year==1990 & ccode==32
    replace laggedautocracy=0 if year==1990 & ccode==33
    replace laggedautocracy=0 if year==1990 & ccode==34
    replace laggedautocracy=0 if year==1990 & ccode==36
    replace laggedautocracy=0 if year==1990 & ccode==37
    replace laggedautocracy=0 if year==1990 & ccode==38
    replace laggedautocracy=0 if year==1990 & ccode==39
    replace laggedautocracy=1 if year==1990 & ccode==40
    replace laggedautocracy=0 if year==1990 & ccode==41
    replace laggedautocracy=0 if year==1990 & ccode==44
    replace laggedautocracy=1 if year==1990 & ccode==45
    replace laggedautocracy=0 if year==1990 & ccode==46
    replace laggedautocracy=1 if year==1990 & ccode==47
    replace laggedautocracy=0 if year==1990 & ccode==48
    replace laggedautocracy=1 if year==1990 & ccode==50
    replace laggedautocracy=0 if year==1990 & ccode==51
    replace laggedautocracy=0 if year==1990 & ccode==52
    replace laggedautocracy=0 if year==1990 & ccode==53
    replace laggedautocracy=0 if year==1990 & ccode==55
    replace laggedautocracy=1 if year==1990 & ccode==57
    replace laggedautocracy=1 if year==1990 & ccode==58
    replace laggedautocracy=0 if year==1990 & ccode==59
    replace laggedautocracy=0 if year==1990 & ccode==60
    replace laggedautocracy=1 if year==1990 & ccode==61
    replace laggedautocracy=0 if year==1990 & ccode==62
    replace laggedautocracy=0 if year==1990 & ccode==63
    replace laggedautocracy=0 if year==1990 & ccode==64
    replace laggedautocracy=0 if year==1990 & ccode==65
    replace laggedautocracy=1 if year==1990 & ccode==66
    replace laggedautocracy=0 if year==1990 & ccode==67
    replace laggedautocracy=1 if year==1990 & ccode==69
    replace laggedautocracy=0 if year==1990 & ccode==70
    replace laggedautocracy=1 if year==1990 & ccode==72
    replace laggedautocracy=1 if year==1990 & ccode==73
    replace laggedautocracy=1 if year==1990 & ccode==74
    replace laggedautocracy=1 if year==1990 & ccode==75
    replace laggedautocracy=0 if year==1990 & ccode==77
    replace laggedautocracy=1 if year==1990 & ccode==79
    replace laggedautocracy=1 if year==1990 & ccode==81
    replace laggedautocracy=0 if year==1990 & ccode==83
    replace laggedautocracy=1 if year==1990 & ccode==85
    replace laggedautocracy=1 if year==1990 & ccode==86
    replace laggedautocracy=0 if year==1990 & ccode==87
    replace laggedautocracy=1 if year==1990 & ccode==88
    replace laggedautocracy=1 if year==1990 & ccode==90
    replace laggedautocracy=0 if year==1990 & ccode==91
    replace laggedautocracy=0 if year==1990 & ccode==92
    replace laggedautocracy=0 if year==1990 & ccode==93
    replace laggedautocracy=0 if year==1990 & ccode==94
    replace laggedautocracy=1 if year==1990 & ccode==95
    replace laggedautocracy=0 if year==1990 & ccode==96
    replace laggedautocracy=1 if year==1990 & ccode==97
    replace laggedautocracy=0 if year==1990 & ccode==98
    replace laggedautocracy=1 if year==1990 & ccode==99
    replace laggedautocracy=0 if year==1990 & ccode==100
    replace laggedautocracy=0 if year==1990 & ccode==101
    replace laggedautocracy=0 if year==1990 & ccode==102
    replace laggedautocracy=1 if year==1990 & ccode==103
    replace laggedautocracy=1 if year==1990 & ccode==104
    replace laggedautocracy=1 if year==1990 & ccode==105
    replace laggedautocracy=1 if year==1990 & ccode==106
    replace laggedautocracy=1 if year==1990 & ccode==107
    replace laggedautocracy=1 if year==1990 & ccode==108
    replace laggedautocracy=1 if year==1990 & ccode==109
    replace laggedautocracy=1 if year==1990 & ccode==110
    replace laggedautocracy=0 if year==1990 & ccode==111
    replace laggedautocracy=0 if year==1990 & ccode==112
    replace laggedautocracy=0 if year==1990 & ccode==113
    replace laggedautocracy=0 if year==1990 & ccode==116
    replace laggedautocracy=1 if year==1990 & ccode==117
    replace laggedautocracy=0 if year==1990 & ccode==118
    replace laggedautocracy=0 if year==1990 & ccode==119
    replace laggedautocracy=1 if year==1990 & ccode==120
    replace laggedautocracy=0 if year==1990 & ccode==121
    replace laggedautocracy=1 if year==1990 & ccode==122
    replace laggedautocracy=1 if year==1990 & ccode==123
    replace laggedautocracy=0 if year==1990 & ccode==125
    replace laggedautocracy=0 if year==1990 & ccode==126
    replace laggedautocracy=0 if year==1990 & ccode==127
    replace laggedautocracy=1 if year==1990 & ccode==128
    replace laggedautocracy=1 if year==1990 & ccode==129
    replace laggedautocracy=1 if year==1990 & ccode==130
    replace laggedautocracy=1 if year==1990 & ccode==131
    replace laggedautocracy=1 if year==1990 & ccode==132


  
 *Recoding ""leader election" into dummy (needed after collapsing to year level)*
 generate leader_election_new=.
replace leader_election_new=1 if leader_elect>0
replace leader_election_new=0 if leader_elect==0
replace leader_election_new=. if leader_elect==.


*Recoding so that countries with slightly less than 1 on the national fiscal rules variable gets coded to 1 (needed after collapsing to year level)
replace nationalfiscalrule=1 if nationalfiscalrule>0 & nationalfiscalrule<1

 *Appendix A (Table A.1): List of autocracies with fiscal rules*

list ccode year nationalfiscalrulesindex if nationalfiscalrule==1 &  laggedautocracy==1 & issuanceOutcome!=.




* Appendix B (Table B.1): Descriptive statistics: Linear probability models
xtsum issuanceOutcome  laggeddemocracy laggedautocracy nationalfiscalrule gov_grossdebt curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region  leader_election_new  exportsToUS crisis_sovdebt hrv imfprogram  if issuanceOutcome!=. &  laggeddemocracy!=. &  nationalfiscalrule!=. & gov_grossdebt!=. & curr_act_gdp!=. &  wdi_oilrent!=. & loggdp!=. &  wdi_gdpcapgr!=. & issue_region!=. & leader_election_new!=. &   exportsToUS!=. & crisis_sovdebt!=.  & imfprogram!=.  

* Appendix B (Table B.1): Descriptive statistics: Linear probability models (only Polyarchy variable)
xtsum  v2x_polyarchymerged if issuanceOutcome!=. & v2x_polyarchymerged!=. &  nationalfiscalrule!=. & gov_grossdebt!=. & curr_act_gdp!=. &  wdi_oilrent!=. & loggdp!=. &  wdi_gdpcapgr!=. & issue_region!=. & leader_election_new!=. &   exportsToUS!=. & crisis_sovdebt!=.  & imfprogram!=.  


*Figure 2a/b & Appendix C (Table B.2)  and associated tests. 
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram   i.year, fe cluster(ccode)
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on bond issuance)
graph export figure2a.png


xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region  leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
margins, dydx(laggedautocracy) by(nationalfiscalrule)
marginsplot, level(95) ytitle(Effect of autocracy on bond issuance)yline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) xtitle(Fiscal rule in place)scheme(s2mono) xlabel(0 "No" 1 "Yes")  graphregion(color(white))legend (off) ylabel(-0.4(0.2)0.4,format(%9.1f))
graph export figure2b.png


xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region  leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
margins, dydx(nationalfiscalrule) by(laggedautocracy)
marginsplot, level(95) ytitle(Effect of fiscal rule on bond issuance)yline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) xtitle(Autocracy)scheme(s2mono) xlabel(0 "No" 1 "Yes")  graphregion(color(white))legend (off) ylabel(-0.4(0.2)0.4,format(%9.1f))

xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region  leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
test laggedautocracy -laggedautocracy#c.nationalfiscalrule= 0 
test laggeddemocracy -laggedautocracy#c.nationalfiscalrule= 0 
test laggeddemocracy -laggedautocracy= 0 
test laggeddemocracy -nationalfiscalrule= 0 


*Appendix F: Robustness tests: Fiscal rule dummy. 


* Figure F.1a Controlling for US treasury rate
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram treasury10yr  i.year, fe cluster(ccode)
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on bond issuance)
graph export figuref1a.png


*Figure F.3a Controlling for central bank independence
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region lvaw_garriga_2012 leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on bond issuance)
graph export figuref3a.png


*Figure F.2a Controlling for inflation
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region inflation_annual leader_election_new  exportsToUS crisis_sovdebt imfprogram   i.year, fe cluster(ccode)
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on bond issuance )
graph export figuref2a.png


*Figure F.4a Controlling for government transparency
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region hrv leader_election_new  exportsToUS crisis_sovdebt imfprogram   i.year, fe cluster(ccode)
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on bond issuance)
graph export figuref4a.png


*Figure F.5a Excluding OECD countries
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram   i.year, fe cluster(ccode), if oecd!=1 
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on bond issuance)
graph export figuref5a.png


*Appendix E (Figure E.1a): probit regression fiscal rule dummy. 
probit issuanceOutcome c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.ccode i.year, cluster(ccode)
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on bond issuance )
graph export figuree1a.png



*Figure 3 & Table B.3: Polyarchy index*

xtreg issuanceOutcome  c.v2x_polyarchymerged##c.nationalfiscalrule gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region  leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on bond issuance) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figure3.png



*Appendix F: Polyarchy index

*Figure F.1b Controlling for US treasury rate
xtreg issuanceOutcome  c.v2x_polyarchymerged##c.nationalfiscalrule gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region  treasury10yr leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on bond issuance ) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figuref1b.png



*Figure F.3b Controlling for central bank independence
xtreg issuanceOutcome  c.v2x_polyarchymerged##c.nationalfiscalrule gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region lvaw_garriga_2012  leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on bond issuance ) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figuref3b.png


*Figure F.2b Controlling for inflation
xtreg issuanceOutcome  c.v2x_polyarchymerged##c.nationalfiscalrule gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region inflation_annual leader_election_new  exportsToUS crisis_sovdebt imfprogram  i.year, fe cluster(ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on bond issuance) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figuref2b.png


*Figure F.4b Controlling for government transparency
xtreg issuanceOutcome  c.v2x_polyarchymerged##c.nationalfiscalrule gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region hrv leader_election_new  exportsToUS crisis_sovdebt imfprogram  i.year, fe cluster(ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on bond issuance) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figuref4b.png


*Figure F.5b Excluding OECD countries
xtreg issuanceOutcome  c.v2x_polyarchymerged##c.nationalfiscalrule gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region  leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode), if oecd!=1 
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on issuance) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figuref5b.png


*Appendix E (Figure E.1b): Probit regression Polyarchy index. 
probit issuanceOutcome  c.v2x_polyarchymerged##c.nationalfiscalrule gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.ccode  i.year, cluster(ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on bond issuance) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figuree1b.png



*Not in paper: All control variables*
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region treasury10yr  lvaw_garriga_2012 inflation_annual leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)


*Appendix D: Fiscal Rules Strenght Indexes: Autocracy*

*Figure D.1
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrulesindex gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region  leader_election_new  exportsToUS crisis_sovdebt imfprogram  i.year, fe cluster(ccode)
margins, dydx(laggedautocracy) at(nationalfiscalrulesindex= (0 (0.5)5))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of autocracy on bond issuance) xtitle(Fiscal rules strength index) addplot(hist nationalfiscalrulesindex if issuanceOutcome!=0. &  laggeddemocracy!=. & nationalfiscalrulesindex!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figured1.png


*Figure D.2
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrulesindex2 gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram  i.year, fe cluster(ccode)
margins, dydx(laggedautocracy) at(nationalfiscalrulesindex2= (0 (0.5)5))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of autocracy on bond issuance) xtitle(Fiscal rules strength index) addplot(hist nationalfiscalrulesindex2 if issuanceOutcome!=0. &  laggeddemocracy!=. & nationalfiscalrulesindex2!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8)))yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figured2.png

*Figure D.3
xtreg issuanceOutcome  c.laggedautocracy##c.nationalfiscalrulesindex3 gov_grossdebt wdi_oilrent loggdp wdi_gdpcapgr curr_act_gdp issue_region  leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster(ccode)
margins, dydx(laggedautocracy) at(nationalfiscalrulesindex3= (0 (0.5)3))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of autocracy on bond issuance) xtitle(Fiscal rules strength index) addplot(hist nationalfiscalrulesindex3 if issuanceOutcome!=0. &  laggeddemocracy!=. & nationalfiscalrulesindex3!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8)))yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figured3.png





*Appenix C: Amount issued 

*Figure C.1a
xtreg log_totalAmt_UT c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode) 
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on log of amount issued)
graph export figurec1a.png


*Figure C.1b
xtreg log_totalAmt_UT c.v2x_polyarchymerged##c.nationalfiscalrule  gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on  log of amount issued) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figurec1b.png



*Appendix G: Credit ratings*

*Has Rating*

*Figure G.1a
xtreg  hasRating c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode) 
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on likelihood of rating)
graph export figureg1a.png


*Figure G.1b
xtreg hasRating c.v2x_polyarchymerged##c.nationalfiscalrule  gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on likelihood of rating) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figureg1b.png


* SP-rating*

*Figure G.2a
xtreg  SPnum c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode) 
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on rating)
graph export figureg2a.png


*Figure G.2b
xtreg SPnum c.v2x_polyarchymerged##c.nationalfiscalrule  gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on rating) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figureg2b.png


* Moody's rating*

*Figure G.3a
xtreg  MoodysNUM c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode) 
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on rating)
graph export figureg3a.png


*Figure G.3b
xtreg MoodysNUM c.v2x_polyarchymerged##c.nationalfiscalrule  gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on rating) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figureg3b.png


*Fitch's rating*

*Figure G.4a
xtreg  FitchNUM c.laggedautocracy##c.nationalfiscalrule laggeddemocracy gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode) 
estimates store fordem 
coefplot fordem, keep(laggedautocracy laggeddemocracy nationalfiscalrule c.laggedautocracy#c.nationalfiscalrule  )  omitted coeflabels(  laggedautocracy="Autocracy without fiscal rule" laggeddemocracy= "Democracy without fiscal rule" nationalfiscalrule="Democracy with fiscal rule" c.laggedautocracy#c.nationalfiscalrule="Autocracy with fiscal rule") xlabel(,format(%9.1f)) xline(0, lstyle(grid) lcolor(gs8) lpattern(dash)) levels( 95 90) graphregion(color(white)) order(laggeddemocracy laggedautocracy nationalfiscalrule  c.laggedautocracy#c.nationalfiscalrule) xtitle(Effect on rating)
graph export figureg4a.png


*Figure G.4b
xtreg FitchNUM c.v2x_polyarchymerged##c.nationalfiscalrule  gov_grossdebt  curr_act_gdp wdi_oilrent loggdp wdi_gdpcapgr issue_region leader_election_new  exportsToUS crisis_sovdebt imfprogram i.year, fe cluster (ccode)
margins, dydx(nationalfiscalrule) at(v2x_polyarchy= (0 (0.1)1))
marginsplot, ylabel(,format(%9.1f) ) title("") xlabel(, format(%9.1f)) level(90) ytitle(Effect of fiscal rule on rating) xtitle(Polyarchy index)addplot(hist v2x_polyarchy if issuanceOutcome!=0. &  v2x_polyarchy!=. & nationalfiscalrule!=. & gov_grossdebt!=. & wdi_oilrent!=. & loggdp!=. & wdi_gdpcapgr!=. , below  percent bin(200)  lcolor(black*0.5) fcolor(white) yaxis(8)ylabel(, axis(8)) yscale(off axis(8))) yline(0, lstyle(grid) lcolor(gs8) lpattern(dash))  graphregion(color(white))legend (off)    scheme(s1mono)  recastci(rline) recast(line)
graph export figureg4b.png


